<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>系统管理员</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="alternate icon" type="image/png" href="../assets/i/favicon.png">
    <link rel="stylesheet" href="../base-component/amazeui/css/amazeui.min.css"/>
    <link rel="stylesheet" href="../base-component/cropper/cropper.min.css"/>
    <link rel="stylesheet" href="../base-component/layui/css/layui.css"/>
    <style>
        .am-edit-width-min {
            min-width: 160px;
            width: 160px;
            max-width: 160px; 
        }
        .am-tab-width-min {
        	min-width: 80px;
        	/* width: 120px;
        	max-width: 80px; */
        }
        h4 {
        	font-weight: bold;
        }
        #roleId label{
        margin: 0 10px 0 0;
        }


    </style>
</head>
<body style="overflow-y: auto">

<div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-prim ary am-text-lg">管理员</strong>
    </div>
</div>


<div class="am-panel am-panel-success">
    <div class="am-panel-hd">
        <h4 class="am-panel-title" data-am-collapse="{parent: '#accordion', target: '#sys-goods-list'}">
            管理员列表<span class="am-icon-chevron-down am-fr" ></span>
        </h4>
    </div>
    <div id="sys-goods-list" class="am-panel-collapse am-collapse am-in">
        <div class="am-panel-bd">
            <div class="am-g">
                <div class="am-u-sm-12 am-scrollable-horizontal">
                   <form method="post" class="am-form" id="sys-product-form-list-search">
                        <div class="am-u-sm-4 am-u-md-4 am-input-group am-fl am-input-group-sm am-margin-bottom"
                             style="padding-left: 0px;padding-right: 0px;">
                            <input id="adminsSarchName" type="text" class="am-form-field" placeholder="请輸入管理员用户名/姓名">
                            <span class="am-input-group-btn">
                                <button class="am-btn am-btn-primary" type="submit">搜索</button>
                            </span>
                        </div>
                    </form>
                    <table class="am-table-compact am-table am-table-striped am-table-hover am-text-sm">
                        <thead>
                        <tr class="am-table">
                            <th class="am-text-truncate">登录用户名</th>
                            <th class="am-text-truncate">姓名</th>
                            <th class="am-text-truncate">邮箱</th>
                            <th class="am-text-truncate">联系电话</th>
                            <th class="am-text-truncate">是否启用</th>
                            <th class="am-text-truncate">操作</th>
                        </tr>
                        </thead>
                        <tbody id="admin-body">

                        </tbody>
                    </table>
                    <div id="system-admin-page" class="am-fr"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 修改模态窗口 -->
<div class="am-modal-dialog" id="system-admin-update-model" style="display: none;">
	<div class="am-u-sm-12">
		<form class="am-form" id="system-admin-form-update" data-am-validator>
	        <fieldset>
                <div class="am-form-group">
                    <div><label>角色类型</label></div>
                    <div id="roleId" style="border: 1px solid #ccc;padding: 10px;">
						
                    </div>
                    <span class="am-form-caret"></span>
                </div>
	            <div class="am-form-group">
	                <label for="username">用户名</label>
	                <input type="text"  id="username" placeholder="" disabled="disabled">
	            </div>
	            <div class="am-form-group">
	                <label for="name">姓名</label>
	                <input   type="text" id="name" placeholder="请输入用户姓名..." name = "name"  >
	            </div>
                <div class="am-form-group">
                    <label for="username">电话</label>
                    <input  type="number"  name="phone" id="phone" placeholder="请输入联系电话..." >
                </div>
	            <div class="am-form-group">
	                <label for="email">邮箱</label>
	                <input  type="text"  id="email" placeholder="请输入用户邮箱..." name = "email" required="required">
	                <span class="am-form-caret"></span>
	            </div>
                <div class="am-form-group passwordBox">
                    <label for="password">修改密码</label>
                    <input  type="text"  id="password" placeholder="请输入新密码..." name = "password" required="required">
                    <span class="am-form-caret"></span>
                </div>
                <div class="am-form-group passwordBox">
                    <label for="passwordSecond">确认密码</label>
                    <input  type="text"  id="passwordSecond" placeholder="请输入确认新密码..." name = "passwordSecond" required="required">
                    <span class="am-form-caret"></span>
                </div>
	            <div class="am-form-group am-form-file">
	                <label for="isEnabled">是否启用</label>
	                <div style="height: 100px; line-height: 100px;">
                        <select id="isEnabled" name = "isEnabled">
                            <option value="1">启用</option>
                            <option value="2">禁用</option>
                        </select>
	                </div>
	            </div>
 	            <p id="saveBtn">
	                <button type="button" class="am-btn am-btn-primary" id="system-admin-update-submit">保存</button>
	            </p> 
	        </fieldset>
	        <input type = "hidden" name = "id" id="orderId" >
	        <input type = "hidden" id="layer-details-id" >
	    </form>
    </div>
</div>

<script id="systemAdmin" type="text/html">
    {{#  layui.each(d.msg, function(index, item){ }}
    <tr>
        <td class="am-text-truncate am-tab-width-min">{{ item.username }}</td>
        <td class="am-text-truncate am-tab-width-min">{{ item.name }}</td>
        <td class="am-text-truncate am-tab-width-min">{{ item.email }}</td>
		<td class="am-text-truncate am-tab-width-min">{{ item.phone }}</td>
        <td class="am-text-truncate am-tab-width-min">{{ item.isEnabledName }}</td>
        <td class="am-text-truncate am-edit-width-min">
            <div class="am-btn-group am-btn-group-xs">
                {{# if(d.msg.flog == "true"){ }}
                <input type="button" class="am-btn am-btn-warning btn-system-admin-update" id="{{ item.id }}" value="修改">
                {{# } }}
                {{# if(d.msg.flog == "false"){ }}
                <input type="button" class="am-btn am-btn-primary btn-system-admin-update" id="{{ item.id }}" value="查看">
                {{# } }}
            </div>
        </td>
    </tr>
    {{#  }); }}
</script>
<script src="../base-component/jquery/jquery.min.js"></script>
<script src="../base-component/amazeui/js/amazeui.min.js"></script>
<script src="../assets/js/api.js"></script>
<script src="../base-component/layer/layer.js"></script>
<script src="../base-component/layui/layui.js"></script>
<script src="../base-component/cropper/cropper.min.js"></script>
<script src="../assets/js/system-admin.js"></script>
</body>
</html>